﻿@using Giant.Core;
@using Giant.Core.Infrastructure
@using Giant.Core.Domain.Users
@using Giant.Services.Configuration
@{
    var authenticated = EngineContext.Current.Resolve<IWorkContext>().CurrentUser.IsRegistered();
    var registerDisabled = EngineContext.Current.Resolve<UserSettings>().UserRegistrationType == UserRegistrationType.Disabled;

}
<!-- ==== HEADERWRAP ==== -->
<div id="headerwrap" name="home">
    <header class="clearfix">
        @Html.Action("TopicContent", "Topic", new { systemName = "HomePageText" })

        @if (authenticated)
        {
            @Html.Action("AdminHeaderLinks", "Common")
            <a href="@Url.RouteUrl("Logout")" class="smoothScroll btn btn-lg">@T("Account.Logout")</a>
        }
        else
        {
            if (!registerDisabled)
            {
                <a href="@Url.RouteUrl("Login")" class="smoothScroll btn btn-lg">@T("Account.Login")</a>
                <a href="@Url.RouteUrl("Register")" class="smoothScroll btn btn-lg">@T("Account.Register")</a>
            }
            else
            {
                <a href="http://demo.giantsoft.cn" class="smoothScroll btn btn-lg" target="_blank">Demo</a>
            }
        }

    </header>
</div>
<!-- /HEADERWRAP -->
